<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="css/root.css"/>
    <link rel="stylesheet" type="text/css" href="css/pay/main.css"/>

    <link rel="stylesheet" type="text/css" href="css/order/order.css"/>
    <script type="text/javascript" src="js/jquery-3.1.1.min.js?ver=2.0.4" charset="utf-8"></script>
    <script type="text/javascript" src="js/underscore-min.js"></script>
    <script src="js/base/api.js"></script>
    <script src="js/base/base.js"></script>
    <script src="js/base/vue-filter.js"></script>
    <script src="js/vue/vue.js"></script>
<!--    <script src="cordova.js"></script>-->

    <script type="text/javascript" src="js/magiclamp.js?ver=2.0.3" charset="utf-8"></script>


    <script type="text/javascript" src="js/order/goods_order.js?ver=2.0.4" charset="utf-8"></script>

    <!-- Core CSS file -->
    <link rel="stylesheet" href="photoswipe/photoswipe.css">

    <!-- Skin CSS file (styling of UI - buttons, caption, etc.)
         In the folder of skin CSS file there are also:
         - .png and .svg icons sprite,
         - preloader.gif (for browsers that do not support CSS animations) -->
    <link rel="stylesheet" href="photoswipe/default-skin/default-skin.css">

    <!-- Core JS file -->
    <script src="photoswipe/photoswipe.min.js"></script>

    <!-- UI JS file -->
    <script src="photoswipe/photoswipe-ui-default.min.js"></script>

</head>
<body>
<div id="goods_order_page">
    <header>
        <a @click="page_back" v-if="baseConfig.is_phone" class="h-left back-btn">
            <i class="iconfont icon-fanhui"></i>
        </a>
        <h1 class="h-title">
            <div v-if="orderinfo.status!=1">尚未支付</div>
            <div v-if="orderinfo.status==1&&orderinfo.goods_status==0">尚未备货</div>
            <div v-if="orderinfo.status==1&&orderinfo.goods_status==1">尚未发货</div>
            <div v-if="orderinfo.status==1&&orderinfo.goods_status==2">等待客户接收</div>
            <div v-if="orderinfo.status==1&&orderinfo.goods_status==3">等待客户确认</div>
            <div v-if="orderinfo.status==1&&orderinfo.goods_status==4">订单结束</div>
        </h1>
    </header>

    <form method="post" id="gotopay_form">
        <div id="root" class="h-t-bar2">
            <div class="pay-gs-list g-wrap">
                <div class="my-order-title padding-def">
                    <div>
                        <img :src="show_head_img(orderinfo.user__icon_url,'&imageView2/1/w/40/h/40')" class="header-img">
                        <span v-text="">{{orderinfo.user__realname}}</span>
                    </div>
                </div>
                <div class="border-top line" v-for="goodsitem in goods_order_item">
                    <div class="g-item">
                        <div class="g-item-wrap">
                            <span class="g-img">
                                <img :src="baseConfig.qn_host+goodsitem.small_image__fileurl+'?imageView2/1/w/70/h/70'">
                            </span>
                            <div class="g-i-info">
                                <p class="g-i-name order-goods-title">{{goodsitem.name}}</p>
                                <p class="order-goods-mark margin-bottom" v-if="goodsitem.gg">
                                    {{goodsitem.gg}}</p>
                                <p class="order-goods-mark" v-if="goodsitem.bz">{{'备注:'+goodsitem.bz}}</p>
                                <p class="order-goods-mark">商品ID:{{goodsitem.goods_id}}</p>
                                <p class="order-count">
                                    <span class="order-goods-price" v-text="price_filter(real_goods_price(goodsitem, orderinfo))"></span>
                                    <span class="order-goods-num">数量{{goodsitem.num}}</span>
                                </p>
                            </div>
                            <div class="g-daigou">
                                <p class="order-count">
                                    <span class="order-goods-num">代购费{{price_filter(goodsitem.all_server_price)}}</span>
                                </p>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
            <div class="text-container">
                <div class="left">店铺地址:</div>
                <div class="right">{{orderinfo.goodsstore__address}}</div>
            </div>
            <div class="text-container">
                <div class="left">订单编号:</div>
                <div class="right">{{orderinfo.id}}</div>
            </div>
            <div class="text-container">
                <div class="left">商品总价:</div>
                <div class="right red-font">{{price_filter((orderinfo.price-orderinfo.all_server_price)/(1+orderinfo.division_proportion*0.01))}}</div>
            </div>

            <div class="text-container">
                <div class="left">运费:</div>
                <div class="right red-font">{{price_filter(orderinfo.express_fee)}}</div>
            </div>
            <div class="text-container">
                <div class="left">代购费合计:</div>
                <div class="right red-font">{{price_filter(orderinfo.all_server_price)}}</div>
            </div>


            <div class="text-container">
                <div class="left">订单总额:</div>
                <div class="right red-font">{{price_filter(orderinfo.price+orderinfo.express_fee)}}</div>
            </div>
            <div class="text-container">
                <div class="left">平台佣金:</div>
                <div class="right red-font">{{price_filter(orderinfo.sys_price)}}</div>
            </div>
            <div class="text-container" v-if="orderinfo.status==1&&orderinfo.price>orderinfo.real_price">
                <div class="left"></div>
                <div class="right red-font">退款:{{price_filter(orderinfo.price - orderinfo.bu_tie_price -orderinfo.real_price)}} 实际成交价:{{price_filter(orderinfo.real_price + orderinfo.bu_tie_price)}}</div>
            </div>
            <div class="text-container">
                <div class="left">付款状态:</div>
                <div class="right">
                    <span v-if="orderinfo.status==0">未付款</span>
                    <span v-if="orderinfo.status==1">已付款</span>
                    <span v-if="orderinfo.status==-1">已取消</span>
                    <span v-if="orderinfo.status==-2">正在退款</span>
                    <span v-if="orderinfo.status==-3">已退款</span>
                </div>
            </div>
            <div class="text-container" v-if="orderinfo.status==1">
                <div class="left">付款时间:</div>
                <div class="right">{{orderinfo.pay_date}}</div>
            </div>

            <div class="padding-1 white" v-if="orderinfo.status==-3||orderinfo.status==-2">
                <div class="order-list">
                    <div class="left">退货方式：</div>
                    <div class="right" v-if="orderinfo.refund_type==1">用户退货</div>
                    <div class="right" v-if="orderinfo.refund_type==2">商家退货</div>
                    <div class="right" v-if="orderinfo.refund_type==3">平台退货</div>
                </div>
            </div>

            <div class="padding-1 white" v-if="orderinfo.dispute_step!=0">
                <div class="order-list">
                    <div class="left">投诉进度：</div>
                    <div class="right" v-if="orderinfo.dispute_step==1">提交投诉</div>
                    <div class="right" v-if="orderinfo.dispute_step==2">正在受理</div>
                    <div class="right" v-if="orderinfo.dispute_step==3">投诉解决</div>
                </div>
            </div>
            <div class="padding-1 white" v-if="orderinfo.dispute_step!=0">
                <div class="order-list">
                    <div class="left">投诉方式：</div>
                    <div class="right" v-if="orderinfo.dispute_type==1">用户投诉</div>
                    <div class="right" v-if="orderinfo.dispute_type==2">主播投诉</div>
                    <div class="right" v-if="orderinfo.dispute_type==3">系统自检</div>
                </div>
            </div>
            <div class="text-container">
                <div class="left">发货状态:</div>
                <div class="right">
                    <span v-if="orderinfo.goods_status==0">未发货</span>
                    <span v-if="orderinfo.goods_status==1">正在备货</span>
                    <span v-if="orderinfo.goods_status==2">已发货</span>
                    <span v-if="orderinfo.goods_status==3">已收货</span>
                    <span v-if="orderinfo.goods_status==4">已完成</span>
                </div>
            </div>
            <div class="text-container" v-if="orderinfo.goods_status>1">
                <div class="left">发货时间:</div>
                <div class="right">{{orderinfo.shipped_date}}</div>
            </div>
            <div class="text-container" v-if="orderinfo.goods_status>1">
                <div class="left">快递公司:</div>
                <div class="right">
                    <span v-if="orderinfo.express__name">{{orderinfo.express__name}}</span>
                    <span v-if="!orderinfo.express__name">{{orderinfo.express_name}}</span>
                </div>
            </div>
            <div class="text-container" v-if="orderinfo.goods_status>1">
                <div class="left">快递单号:</div>
                <div class="right">{{orderinfo.express_no}}</div>
            </div>
            <div class="text-container" v-if="orderinfo.goods_status>2">
                <div class="left">收货时间:</div>
                <div class="right">{{orderinfo.received_date}}</div>
            </div>
            <div class="text-container" v-if="orderinfo.goods_status>3">
                <div class="left">完成时间:</div>
                <div class="right">{{orderinfo.complete_date}}</div>
            </div>
            <div class="text-container">
                <div class="left">联系人:</div>
                <div class="right">{{orderinfo.receiver_name}}</div>
            </div>
            <div class="text-container">
                <div class="left">联系电话:</div>
                <div class="right">{{orderinfo.receiver_phone}}</div>
            </div>
            <div class="text-container">
                <div class="left">地址:</div>
                <div class="right">
                    {{orderinfo.receiver_province_name}}{{orderinfo.receiver_city_name}}{{orderinfo.receiver_county_name}}
                </div>
            </div>
            <div class="text-container">
                <div class="left">详细地址:</div>
                <div class="right">{{orderinfo.receiver_address_detail}}</div>
            </div>
            <div class="text-container" v-if="orderinfo.buyer_txt">
                <div class="left">商家备注:</div>
                <div class="right">{{orderinfo.buyer_txt}}</div>
            </div>
            <div class="text-container" v-if="orderinfo.is_out">
                <div class="left">身份证正面:</div>
                <div class="right">

                </div>
            </div>
            <img :src="baseConfig.qn_host+orderinfo.id_img_1__fileurl" width="100%" v-if="orderinfo.is_out">
            <div class="text-container" v-if="orderinfo.is_out">
                <div class="left">身份证反面:</div>
                <div class="right">
                </div>
            </div>
            <img :src="baseConfig.qn_host+orderinfo.id_img_2__fileurl" width="100%" v-if="orderinfo.is_out">
            <div class="padding-1 white goods-block"  v-if="orderinfo.buy_video_id">
                <div class="goods-block-img">
                    <video  :src="baseConfig.qn_host + orderinfo.buy_video__fileurl" x-webkit-airplay="true" x5-video-player-type="h5" controls="controls"></video>

                </div>

                <div class="goods-block-img" v-for="img in orderinfo.buy_files_json_obj" @click="show_big_pengyou_img(orderinfo.buy_files_json_obj, img.fileurl)">
                    <img :src="img.url + '&imageView2/1/w/120/h/120'">
                </div>

            </div>
            <div class="pay-btn-group border-top">

                <div v-if="orderinfo.status==1&&orderinfo.goods_status==0">
                    <br>
                    <p class="grey-font">备货后用户无法退货。</p>
                    <br>
                </div>
                <button type="button" class="open-payorder-btn" v-if="orderinfo.dispute_step!=0" @click="open_dispute_orders(orderinfo)">查看所有投诉</button>
                <button type="button" class="open-payorder-btn" @click="open_im_2_host(orderinfo)"
                >私聊
                </button>

                <button type="button" class="open-payorder-btn" @click="start_goods_order_ready"
                        v-if="orderinfo.status==1&&orderinfo.goods_status==0">开始备货
                </button>
                <button type="button" class="open-payorder-btn" @click="send_goods_order_express"
                        v-if="orderinfo.status==1&&orderinfo.goods_status==1">发货
                </button>
                <button type="button" class="delete-payorder-btn" @click="refused_order(orderinfo)"
                        v-if="orderinfo.status==1&&orderinfo.goods_status!=4">退货
                </button>

                <button type="button" class="open-payorder-btn" @click="set_buyer_txt"
                        >写备注
                </button>
            </div>

        </div>
    </form>
    <div  v-if="show_pengyou_dongtai_images">
        <div class="pswp" id="all_hundan_images" tabindex="-1" role="dialog" aria-hidden="true">

            <!-- Background of PhotoSwipe.
                 It's a separate element as animating opacity is faster than rgba(). -->
            <div class="pswp__bg"></div>

            <!-- Slides wrapper with overflow:hidden. -->
            <div class="pswp__scroll-wrap">

                <!-- Container that holds slides.
                    PhotoSwipe keeps only 3 of them in the DOM to save memory.
                    Don't modify these 3 pswp__item elements, data is added later on. -->
                <div class="pswp__container">
                    <div class="pswp__item"></div>
                    <div class="pswp__item"></div>
                    <div class="pswp__item"></div>
                </div>

                <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
                <div class="pswp__ui pswp__ui--hidden">

                    <div class="pswp__top-bar">

                        <!--  Controls are self-explanatory. Order can be changed. -->

                        <div class="pswp__counter"></div>

                        <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>


                        <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                        <!-- element will get class pswp__preloader--active when preloader is running -->
                        <div class="pswp__preloader">
                            <div class="pswp__preloader__icn">
                                <div class="pswp__preloader__cut">
                                    <div class="pswp__preloader__donut"></div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                        <div class="pswp__share-tooltip"></div>
                    </div>

                    <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
                    </button>

                    <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
                    </button>

                    <div class="pswp__caption">
                        <div class="pswp__caption__center"></div>
                    </div>

                </div>

            </div>

        </div>
    </div>
</div>
</body>

</html>